<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

<f:view contentType="text/html" locale="en_US">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <ui:insert name="header">
            <ui:include src="/templates/header.xhtml"/>
        </ui:insert>
        <link href="css/loginStyle.css" rel="stylesheet" type="text/css"/>
        <style type="text/css">
            body {
                font-size: 10px;
            }
        </style>
    </h:head>
    <h:body>
        <p:layout fullPage="true" >
            <p:layoutUnit id="top" position="center" size="140">
                <div style="position: absolute; top: 250px; right: 280px; z-index: 2; font-size: 10px;">
                    <c:if test="${not empty param.authFailure}">
                        <div class="ui-message-error ui-widget ui-corner-all" style="text-align: center;">
                            #{messages.label_security_err}
                        </div>
                    </c:if>
                    <c:if test="${not empty param.authSessionjFailure}">
                        <div class="ui-message-error ui-widget ui-corner-all" style="text-align: center;">
                            #{messages.label_security_dobleSession}
                        </div>
                    </c:if>
                </div>
                <p:idleMonitor
                        onactive="window.location='#{facesContext.externalContext.requestContextPath}/login.jsf';"
                        timeout="#{session.maxInactiveInterval * 1000}"/>
                <h:form id="loginForm" prependId="false" style=" background: url(../images/bkg_page.png) repeat-x #C7CEDA;">
                    <div id="todo">
                        <div id="cuerpo-index">
                            <div id="bannerEmpresa" />
                            <div id="labelBanner"><h1 align="right"></h1></div>
                            <div id="banner"></div>
                            <div id="sidebar"></div>
                            <div id="texto">
                                <div class="top">
                                    <h3>Login de Usuario</h3>
                                </div>
                                <div class="testimonio-cliente">
                                    <table width="250" border="0" style="margin: 0 auto !important;">
                                        <tr>
                                            <td colspan="2" height="20">&nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td><label><h:outputText value="Usuario"/></label></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <h:inputText id="j_username" name="j_username" required="true"
                                                             requiredMessage="#{messages.property_user_required}"
                                                             autocomplete="on"
                                                             styleClass="input"
                                                             style="border:1px solid #C5DBEC; height: 15px; width: 200px;"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" height="5"></td>
                                        </tr>
                                        <tr>
                                            <td><label><h:outputText value="Password"/></label> </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <h:inputSecret id="j_password" styleClass="input" autocomplete="on"
                                                               requiredMessage="#{messages.property_password_required}"
                                                               required="true" size="30"
                                                               style="border:1px solid #C5DBEC; height: 15px; width: 200px;"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" height="5"></td>
                                        </tr>

                                        <tr>
                                            <td width="62" colspan="2">
                                                <p:commandButton actionListener="#{loginBean.loginAction}"
                                                                 value="Ingresar" ajax="false"/>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <div class="copy">
                                <p>©2014 DP WORLD CALLAO - Todos los derechos reservados </p>
                            </div>
                        </div>
                    </div>
                    <div style="position: absolute; top: 250px; right: 280px; z-index: 2; font-size: 10px;">
                        <h:messages showDetail="false"
                                    style="background-color: #FFBABA; font-weight: bold; color: #D8000C; padding-left: 15px; padding-top: 10px;padding-bottom: 10px; padding-right: 15px; border: solid 1px #D8000C; "/>
                    </div>
                </h:form>
            </p:layoutUnit>
        </p:layout>
    </h:body>
</f:view>
</html>